<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>节点1</title>
	<script type="text/javascript">
	window.onload = function  () {
		box = document.getElementById("box");
		box1 = document.getElementById("box1");
		btn = document.getElementById("btn");
		son = document.getElementById("son");
		son1 = son.cloneNode(true);
		btn.onclick = function  () {
			son1 = son.cloneNode(true);
			box1.appendChild(son1);
			// a = document.createElement("a");
			// a.href = "http://www.baidu.com";
			// a.innerHTML = "百度";
			// box.replaceChild(a,son);
			// // box.insertBefore(a,son);
		}
		
	}



	</script>
	<style type="text/css">
			.box{
				width: 200px;
				height: 200px;
				background: gray;
			}
			.box1{
				width: 200px;
				height: 200px;
				background: red;
			}


	</style>
</head>
<body>
	<input type="button" id="btn" value="添加">
	<div id="box" class="box">
		<p id="son">儿子</p>
	</div>
	<div class="box1" id="box1">
		
	</div>
</body>
</html>